package com.powernode.settings.dao;

import com.powernode.settings.bean.UserBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(String id);

    int insert(UserBean record);

    int insertSelective(UserBean record);

    UserBean selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(UserBean record);

    int updateByPrimaryKey(UserBean record);

    List<UserBean> selectAll();

    UserBean selectByActAndPsw(String act,String psw);

    int updatePswById(@Param("id") String id,@Param("psw") String psw);

    /**
     * 根据主键修改锁定状态
     * @param userId
     * @param state
     * @return
     */
    int updateLockStateById(String userId,String state);

    /**
     * 检测账户名是否已经存在
     * @param act
     * @return
     */
    UserBean selectLoginAct(String act);

}